<?php
$news_title=$_GET['news_title'];
$news_content=$_GET['news_content'];
$dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
$sql="insert into article(news_title,news_content) VALUES('$news_title','$news_content')";
$arr=$dbh->exec($sql);
if($arr)
{
    header("location:list.php");
}
else{
    echo "添加失败";
}